---
import BlogPost from "../components/BlogPost.astro";
import BaseLayout from "../layouts/BaseLayout.astro";
const allPosts = Object.values(
  import.meta.glob("./posts/*.md", { eager: true }),
);
const pageTitle = "博客";
---

<BaseLayout pageTitle={pageTitle}>
  <h2>我的博客</h2>
  <ul>
    {
      allPosts.map((post: any) => (
        <BlogPost url={post.url} title={post.frontmatter.title} />
      ))
    }
  </ul>
</BaseLayout>
